<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/admin/css/style.css" rel="stylesheet" type="text/css" />

<style>
	.pagination li{
        width: 20px;
        height: 20px;
        /*border: 1px solid gray;*/
        margin-left: 1px;
        float:left;
</style>

 <script type="text/javascript" src="/admin/js/common.js"></script>
<script type="text/javascript">
	BackTop=function(btnId){ 
		var btn=document.getElementById(btnId); 
		var d=document.documentElement; 
		window.onscroll=set; 
		btn.onclick=function (){ 
			btn.style.display="none"; 
			window.onscroll=null; 
			this.timer=setInterval(function(){ 
			d.scrollTop-=Math.ceil(d.scrollTop*0.1); 
			if(d.scrollTop==0) clearInterval(btn.timer,window.onscroll=set); 
		},10); 
	}; 
	function set(){btn.style.display=d.scrollTop?'block':"none"} 
	}; 
	BackTop('gotop'); 
</script>
</head>
<body>
<div class="colorarea01">
	<div class="search clearfix">
		<div class="searchL">
			<ul class="menulist">
				<li><a href="{{url('admin/addbr')}}" class="add">添加品牌</a></li>
			</ul>
		</div>
		<div class="searchR" style="padding-top:5px">
			<!-- <{foreach from=$match_arr item=match}> -->
<!-- 			<a href="<{$adminpage}>?m=brand&a=list&k=<{$match}>" <{if $sel_key ==$match}>class="fb"<{/if}>>&nbsp;<{$match}>&nbsp;</a>&nbsp; -->
			<!-- <{/foreach}> -->
		</div>
	</div>
	<div>
		<form action="<{$adminpage}>?m=brand" method="post" name="form">     
        <div class="main">
			<!-- <{foreach from=$brandlist item=pbrands}> -->
			@foreach ($brandlist as $pbrands)
			@if($pbrands->b_parent == -1)
			<div class="letter">
				<span class="fr"><a href="#top" target="_self" class="gray01">返回顶部↑</a></span>
				<b class="orange01">{{$pbrands->mark}}</b>
			</div>
			<div class="brandlist clearfix">
				<div class="brandlist_left">
					<div class="pbrandname">
						<ul>
							<li>
								<!-- <{if $pbrands.b_pic<>""}> -->
								<img src="{{$pbrands->pic}}">
								<!-- <{else}> -->
								<!-- <{/if}> -->
								<b>{{$pbrands->b_name}}</b>
								<div class="brandmenu">
								<input type="hidden" name="" value="{{$pbrands->b_id}}" />
									<a href="{{url('admin/addbr',['b_id'=>$pbrands->b_id])}}" class="add">添加子品牌</a> | 
									<a href="{{url('admin/editbrand',['b_id'=>$pbrands->b_id])}}" class="edit">编辑</a> | 
									<a href="{{url('admin/delbrand',['b_id'=>$pbrands->b_id])}}" class="del">删除</a>
								</div>
							</li>
						</ul>
					</div>
				</div>
				<div class="brandlist_right">
					<!-- <{foreach from=$pbrands.brands_list item=brands_list}> -->
					<div class="brandname mt10">
						<b>{{$pbrands->b_name}}</b>
						<div class="brandmenu"><a href="<{$adminpage}>?m=brand&a=add&id=<{$brands_list.b_id}>&page=<{$page}>" class="add">添加车系</a> | <a href="<{$adminpage}>?m=brand&a=edit&id=<{$brands_list.b_id}>&page=<{$page}>" class="edit">编辑</a> <a href="javascript:if(confirm('确实要删除吗?'))location='<{$adminpage}>?m=brand&a=del&id=<{$brands_list.b_id}>&page=<{$page}>'" class="del">删除</a>
						</div>
					</div>
					<div class="subbrandname">
						<ul class="clearfix">
							<!-- <{foreach from=$brands_list.subbrands_list item=subbrands_list}> -->
							<li>{{$pbrands->b_name}}
								<div class="brandmenu">
								<a href="<{$adminpage}>?m=brand&a=edit&id=<{$subbrands_list.b_id}>&page=<{$page}>" class="edit">编辑</a> <a href="javascript:if(confirm('确实要删除吗?'))location='<{$adminpage}>?m=brand&a=del&id=<{$subbrands_list.b_id}>&page=<{$page}>'" class="del">删除</a>
                                <a href="<{$adminpage}>?m=carmodel&a=list&p_subbrand=<{$subbrands_list.b_id}>">查看</a>
								</div>
							</li>
							<!-- <{/foreach}> -->
						</ul>
					</div>
					<!-- <{/foreach}> -->
				</div>
			</div>
        </div>
        @endif
        @endforeach
		</form>
		{!!$brandlist->render()!!}
	</div>
</div>
</body>
</html>